@import './typo.scss';

$border-width: 1px;

html {
    overflow-y: scroll;
}

.v--modal-block-scroll{
    height: 100vh;
}

.nya-c-theme{
    color: var(--theme);
}

.nya-c-success{
    color: var(--theme-success);
}

.nya-c-danger{
    color: var(--theme-danger);
}

.nya-c-info{
    color: var(--theme-info);
}

.nya-c-wrning{
    color: var(--theme-wrning);
}

:root {
    overflow-y: auto;
    overflow-x: hidden;
    --t0: transparent;
    --theme: #249ffd;
    --theme-success: #52de97;
    --theme-danger: #fa5477;
    --theme-info: #9ed0ff;
    --theme-wrning: #ffdd98;
    --border-color: #DCDEE0;
    @media (max-width: 500px) {
        font-size: 13px;
    }
    @media (max-width: 380px) {
        font-size: 12px;
    }
    @media (max-width: 350px) {
        font-size: 10px;
    }
}

.sweetalert2{
    animation: fadeIn .15s;
    box-shadow: 0 20px 60px -2px rgba(27, 33, 58, 0.4);
    input.swal2-input{
        width: 100%;
        height: auto;
        padding: 10px 15px;
        box-sizing: border-box;
        border: 1px solid var(--border-color);
        background-color: transparent;
        color: var(--t1);
        outline: none;
        transition: border-color 0.2s ease;
        box-shadow: none;
        border-radius: 0;
        font-size: 16px;
        &[disabled='disabled'] {
            opacity: 0.8;
            cursor: no-drop;
        }
        &::placeholder {
            color: rgb(158, 158, 158);
        }
        &:focus {
            border-color: var(--theme);
        }
    }
}
.swal2-modal.tleft {
    #swal2-content {
        text-align: left;
    }
}
div.swal2-container.swal2-shown {
    background-color: rgba(0, 0, 0, 0.2);
    animation: fadeIn .2s;
}
@keyframes fadeIn {
    from {
      opacity: 0;
    }
  
    to {
      opacity: 1;
    }
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100vw;
    overflow: hidden;
    background-color: #f4f8fb;
    color: var(--t1);
}

a {
    color: #0366d6;
    word-break: break-all;
    text-decoration: none;
    a[target="_blank"] {
        cursor: alias;
    }

    &:hover {
        text-decoration: underline;
    }
}

pre {
    margin: 15px 0;
    padding: 10px 15px;
    line-height: 1.5;
    font-size: 14px;
    font-family: Menlo, Monaco, Consolas, Andale Mono, lucida console, Courier New, monospace;
    background-color: #f2f4f5;
    color: #314659;
    overflow-x: auto;
    &::-webkit-scrollbar {
        width: 10px;
        height: 8px;
    }
    &::-webkit-scrollbar-thumb {
        background-color: var(--theme);
    }
}

hr {
    height: 10px;
    margin-top: 0;
    margin-bottom: 10px;
    border: none;
    border-bottom: 1px dashed var(--border-color);
}

// 滚动条
::-webkit-scrollbar {
    width: 8px;
    height: 10px;
}

/*滑块*/
::-webkit-scrollbar-thumb {
    background-color: var(--theme);
}

.hasbg{
    --border-color: rgb(194, 194, 194);
}

.dark {
    background-color: var(--t2);
    --theme: #4183c4;
    --border-color: #6a6a6a;
    .hasbg {
        --border-color: #6a6a6a;
    }
    a {
        color: #4183c4;
    }
    .vue-dialog {
        .vue-dialog-buttons {
            border-top: 1px solid rgb(97, 97, 97);
        }
    }
    .pay {
        img {
            background-color: rgba($color: #fff, $alpha: .65);
            border-radius: 5px;
            &[alt="weixin"]{
                border-radius: 50%;
            }
        }
    }
    .nya-container {
        background-color: #282c34;
        &.transparent{
            background-color: rgba($color: #282c34, $alpha: .65);
        }
        .nya-title{
            background-color: #161616;
            box-shadow: 0 0.5rem 0.625rem rgba(15, 15, 15, 0.30196)
        }
    }
    .nya-btn{
        color: inherit;
    }
    .nya-input {
        input,
        textarea,
        .input-file {
            &::placeholder {
                opacity: 0.5;
            }
        }
    }
    .search-component{
        .search{
            background-color: #282c34;
            &.transparent{
                background-color: rgba($color: #282c34, $alpha: .65);
            }
        }
    }
    pre{
        background-color: #acacac;
    }
    .float-btn{
        opacity: .8;
    }
}

.nya-subtitle{
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}

.nya-bg-0 {
    background-color: var(--t0);
}

.nya-bg-1 {
    background-color: var(--t1);
}

.nya-bg-2 {
    background-color: var(--t2);
}

.nya-bd-0 {
    border-color: var(--t0);
}

.nya-bd-1 {
    border-color: var(--t1);
}

.nya-bd-2 {
    border-color: var(--t2);
}

.nya-co-0 {
    color: var(--t0);
}

.nya-co-1 {
    color: var(--t1);
}

.nya-co-2 {
    color: var(--t2);
}

.vue-dialog {
    background-color: var(--t2) !important;
    color: var(--t1) !important;
    max-width: 100%;
}

a.nya-btn{
    color: var(--t1);
    &:hover{
        text-decoration: none;
    }
}

.nya-btn {
    display: inline-block;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    border: 1px solid var(--border-color);
    background-color: rgba($color: var(--theme), $alpha: .1);
    color: var(--t1);
    transition: border-color .2s ease, color .2s ease;
    letter-spacing: 1px;

    &.is-smail {
        font-size: 14px;
        padding: 4px 10px;
    }

    &:active, &.active {
        background-color: var(--theme);
        color: #fff;
        border-color: var(--theme);
    }

    &:hover{
        border-color: var(--theme);
        color: var(--theme);
    }

    &[disabled="disabled"] {
        opacity: .8;
        cursor: no-drop;
    }
}

.nya-list {
    margin-left: 0;
    padding-left: 20px;

    li {
        margin: 10px 0;
        line-height: 1.3;
    }
}

.nya-table {
    border-spacing: 0;
    border-top: solid $border-width;
    border-right: solid $border-width;
    border-color: var(--border-color);
    max-width: 100%;
    margin: auto;
    border-collapse: collapse;
    white-space: nowrap;
    table-layout:fixed;
    overflow: auto;
    th,
    td {
        font-size: 18px;
        border-bottom: solid $border-width;
        border-left: solid $border-width;
        border-color: var(--border-color);
        border-collapse: collapse;
        padding: 10px;
        text-align: left;
        text-overflow:ellipsis;
        overflow:hidden;
    }
    @media(max-width: 600px){
        display: block;
        white-space: nowrap;
        overflow: auto;
        width: 100%;
        table-layout: auto;
    }
}

.inputbtn {
    display: flex;
    align-items: flex-end;
    max-width: 100%;
    .nya-input, .nya-btn{
        display: inline-block;
    }
    .nya-input{
        flex:1;
        max-width: calc(100% - 120px);
    }
    button {
        position: relative;
        left: -1px;
        width: 120px;
        border-left-color: transparent;
    }
}

.nya-hide-scroll{
    &::-webkit-scrollbar {
        width: 0 !important;
    }
    -ms-overflow-style: none;
    overflow: -moz-scrollbars-none;
}

fieldset {
    min-inline-size: auto;
}

.mb-15 {
    margin-bottom: 15px;
}

.mt-15 {
    margin-top: 15px;
}

.ml-15 {
    margin-left: 15px;
}

.mr-15 {
    margin-right: 15px;
}

img {
    max-width: 100%;
}
